Skip to content

Conversation

@davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Aug 16, 2025

Has been fixed upstream, let's simplify and xfail for now, the next PyPy patch release will fix this.

@davidhewitt davidhewitt changed the title fix "cannot create '%s' instances" message to match CPython fix "no constructor defined" messages on PyPy Aug 22, 2025
/// Default new implementation
#[cfg(not(all(Py_3_10, not(PyPy))))]
/// Default new implementation, to match
/// <https://github.com/python/cpython/blob/3663b2ad54c9e15775a605facf69da8f5ee8d335/Objects/typeobject.c#L2427-L2428>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this comment still makes sense. I guess the output should be identical still..


Also I think the #[cfg(not(PyPy))] in the trampoline below needs to go now, because PyPy does the same thing as CPython now, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching, sorry for my shoddy patch 😂

@davidhewitt davidhewitt enabled auto-merge August 24, 2025 19:38
@davidhewitt davidhewitt added this pull request to the merge queue Aug 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 24, 2025
@davidhewitt davidhewitt enabled auto-merge August 25, 2025 08:08
@davidhewitt davidhewitt added this pull request to the merge queue Aug 25, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 25, 2025
@davidhewitt davidhewitt added this pull request to the merge queue Aug 25, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 25, 2025
* fix "cannot create '%s' instances" message to match CPython

* don't use unlimited C API directly

* review feedback

* fixup

* fixup xfail on PyPy
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 25, 2025
@davidhewitt davidhewitt added this pull request to the merge queue Aug 25, 2025
Merged via the queue into PyO3:main with commit 9cc0bb6 Aug 25, 2025
43 of 44 checks passed
@davidhewitt davidhewitt deleted the no-constructor-defined branch August 25, 2025 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants